FROM openjdk:8-alpine3.9
MAINTAINER 老李学docker
#修改源
RUN echo "http://mirrors.aliyun.com/alpine/latest-stable/main/" > /etc/apk/repositories && \
echo "http://mirrors.aliyun.com/alpine/latest-stable/community/" >> /etc/apk/repositories
#修改时区
RUN apk --update add curl bash tzdata && \
rm -rf /var/cache/apk/*

#修改镜像为东八区时间
ENV TZ Asia/Shanghai
#构建镜像时运行参数
ARG JAR_FILE
#复制
COPY ${JAR_FILE} app.jar
EXPOSE 8080

ENTRYPOINT ["java","-jar","app.jar"]